Menu

MAP 220 Exporter

nemyax

MAP 220 (Half-Life Map) Exporter for Blender 2.79+

This script exports polygonal geometry as Half-Life map brushes. Each mesh triangle is converted to an individual brush shaped like a tetrahedron. The original triangle face is correctly textured, and the brush's three extra faces are assigned the NULL texture.

This exporter is intended for making decorations for your maps rather than complete map geometry. Don't expect the resulting .map files to compile to waterproof .bsps. It's possible but unlikely. However, using your exported fragments in larger maps works pretty well.

Installation

Install this script as an add-on:

  1. Open Blender's User Preferences window and go to the Add-ons tab.
  2. Click Install from File and specify the downloaded map220-export-*.*.*.zip file or the unpacked map220-export.py file.
  3. Enable the Import-Export: MAP 220 Export addon.
  4. To make your changes persistent, click Save User Settings.

Exporting a map

  1. Click File | Export | MAP 220 Brushes in the main menu.
  2. If necessary, change the Thickness option for the brushes.
  3. By default, only meshes on visible layers are exported. To write all meshes in the scene, clear the Export only from visible layers option.
  4. By default, the exported brushes are tied to a func_detail entity. This is helpful if you reference the geometry from another map through an entity like misc_model. If you'd rather make the brushes structural, clear the Wrap in func_detail option.
  5. If necessary, set the Scale parameter.

How textures are handled

The add-on associates texture names on brush faces with the names of materials on meshes (not with the names of Blender textures). Your materials should be named exactly as you want the resulting texture references to look in the map files.

In addition to the texture name, the width and height of the texture image must exactly match those in the game. This is required for correct texture application. To get the the image width and height, the exporter looks at the material's associated textures and uses the dimensions of the first image texture that it finds. If you don't have the exact same image handy, create a blank image texture with the right dimensions directly in Blender.

If no texture is attached to a material, the dimensions are assumed to be 64x64.

For faces that don't have a material assigned, the CLIP texture is written.


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.